package com.usian.service.impl;



import com.github.pagehelper.PageInfo;
import com.usian.mapper.JobMapper;
import com.usian.pojo.Job;
import com.usian.service.JobService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class JobServiceImpl implements JobService {
    @Autowired
    private JobMapper jobMapper;


    @Override
    public PageInfo<Job> findAll(Integer page, Integer size, Job job) {
        PageInfo<Job> pageInfo = new PageInfo<>(jobMapper.findAll(job));
        return pageInfo;
    }

    @Override
    public void add(Job job) {
        jobMapper.insert(job);
    }

    @Override
    public void etid(Job job) {
        jobMapper.updateById(job);
    }

    @Override
    public void del(Integer id) {
        jobMapper.deleteById(id);
    }

}
